﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinFormsApp1
{
    /// <summary>
    /// 专门为了任务用的
    /// </summary>
    public class SimpleTaskEntity: ICommonEntityConvertable, ICommonEntity
    {
        public string id { get; set; }
        public string name { get; set; }
        public string group { get; set; }
        public string planStartTime { get; set; }
        public string planEndTime { get; set; }
        public string realStartTime { get; set; }
        public string realEndTime { get; set; }
        public string worker { get; set; }
        public string challenge { get; set; }

        public CommonEntity ToCommonEntity()
        {
            var a = new CommonEntity()
            {
                id = this.id,
            };
            a.labels = new List<string>() { name };
            a.properties = new Dictionary<string, string>();
            a.properties.Add("name", name);
            a.properties.Add("group", group);
            return a;
        }
    }
}
